package com.legendframework.core.ioc;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

public final class MethodIParameter implements IParameter {

    private java.lang.reflect.Parameter parameter;

    public MethodIParameter(java.lang.reflect.Parameter parameter){
        this.parameter = parameter;
    }

    @Override
    public Class<?> getType() {
        return parameter.getType();
    }

    @Override
    public Type getParameterizedType() {
        return parameter.getParameterizedType();
    }

    @Override
    public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
        return parameter.getAnnotation(annotationClass);
    }

    @Override
    public Annotation[] getAnnotations() {
        return parameter.getAnnotations();
    }

    @Override
    public Annotation[] getDeclaredAnnotations() {
        return parameter.getDeclaredAnnotations();
    }
}
